package com.kedacom.ctsp.authz.oauth2.core.vo;

import com.kedacom.ctsp.authz.entity.Authentication;
import lombok.Data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

@Data
public class AuthResourceQueryParam implements Serializable {

    //用户信息
    private PlainAuthentication authentication;

    //获取的资源标识
    private Set<String> resources;

    public AuthResourceQueryParam() {

    }

    public AuthResourceQueryParam(Authentication authentication, Set<String> resources) {
        this.authentication = new PlainAuthentication(authentication);
        this.resources = resources == null ? new HashSet<>() : resources;
    }
}
